#include<iostream>
#include<functional>
#include<cstdlib>
#include<memory>
class A{
    public:
    using Func=std::function<void(int)>;
    A(Func f):m_f(f){}
    void start(){
        
        m_f(rand());
    }
    private:
    Func m_f;
};

class Test{
    public:
    void testFunc(int num){
        std::cout<<"函数的参数是: "<<num<<std::endl;
    }
};

int main(){
    Test a_b;
    auto iter =&Test::testFunc;
    auto ptr = new A(std::bind(&Test::testFunc,&a_b,std::placeholders::_1));
    ptr->start();
    return 0;
}


